Hi, |
Re: when an in-link is created? Then examine the code till you have it memorized. |
Re: when an in-link is created? Ron_Lewis - Thu Jun 04 13:52:17 EDT 2009 I did not understand how this solves my problem. I want to find how to get the information programatically using DXL, not by manually looking at information in the DOORS clients. Just for background, I am developing sensor scripts to monitor requirements specifications. For this, I am doing an automated analysis of history using dxl. Anil. |
Re: when an in-link is created? SystemAdmin - Fri Jun 05 03:07:03 EDT 2009
This solves your problem by generating the code for you!
Object o = current
Object othero = null
ModuleVersion otherVersion = null
ModName_ otherMod = null
LinkRef lr = null
Link l = null
for lr in all(o<-"*") do {
otherMod = module (sourceVersion lr)
if (!null otherMod) {
if ((!isDeleted otherMod) && (null data(sourceVersion lr))) {
load((sourceVersion lr),false)
}
}
}
for l in all(o<-"*") do {
otherVersion = sourceVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = source l
if (null othero) {
load(otherVersion,false)
}
othero = source l
if (null othero) continue
if (isDeleted othero) continue
print("Link created from object " othero."Absolute Number" " ")
print(l."Created By" " ")
print(l."Created On" "\n")
}
|
Re: when an in-link is created? Tony_Goodman - Fri Jun 05 03:22:15 EDT 2009
This solves your problem by generating the code for you!
Object o = current
Object othero = null
ModuleVersion otherVersion = null
ModName_ otherMod = null
LinkRef lr = null
Link l = null
for lr in all(o<-"*") do {
otherMod = module (sourceVersion lr)
if (!null otherMod) {
if ((!isDeleted otherMod) && (null data(sourceVersion lr))) {
load((sourceVersion lr),false)
}
}
}
for l in all(o<-"*") do {
otherVersion = sourceVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = source l
if (null othero) {
load(otherVersion,false)
}
othero = source l
if (null othero) continue
if (isDeleted othero) continue
print("Link created from object " othero."Absolute Number" " ")
print(l."Created By" " ")
print(l."Created On" "\n")
}
|
Re: when an in-link is created? IBM_Gust - Sat Jun 06 08:20:09 EDT 2009 This is a very good script to get the history of the source objects. I have a couple of queries on the details of the code: if (null othero) { load(otherVersion,false) } Do you mean "if (!null othero)" ? Then "othero = source l" is declared a second time. Is there any significance for the above code which I am not able to understand?
|
Re: when an in-link is created? SystemAdmin - Thu Jun 11 21:28:59 EDT 2009
The LinkRef loop is used to identify and open the source modules. The in-Link loop is the used to access the source objects. The source object is checked for null, and if it is null then this may be due to the source module not being open, so it is loaded. Then the source Object handle is refreshed. The code still works without this second check, but is safer to leave it there. |
Re: when an in-link is created? Tony_Goodman - Fri Jun 12 02:36:27 EDT 2009 Thanks for the explanation.
|